package chain;

/**
 * @author wcj
 * @Date 2021/7/10 0:23
 * @Version 1.0
 */
public class President extends Manager {

    public President(Manager manager) {
        super(manager);
    }

    @Override
    public void request(Student student) {
        if (student.getDay() <= 5) {
            System.out.println("我是院长，我可以直接处理" + student.getName() + "的假期:" + student.getDay() + "天");
        } else {
            System.out.println("我是院长，无法处理!");
            if (manager != null) {
                manager.request(student);
            }
        }
    }
}
